package lesson2;

//练习题
//小明同学向某网贷平台借款2000元，当月利息为180元，请问一年后本金+利息总共需要还多少钱
//5625.3295
public class Demo2 {
    public static void main(String[] args) {
        double money = 2000;
        double rate = 180.0/2000;
        System.out.println(rate);
        for(int i = 1; i <= 12; i++){
            //money = money+money*rate;
            // money = money*(1+rate);
            money*=(1+rate);
        }
        System.out.println(money);
    }
}
